package com.dq.Week1.day03.method;

public class Qfsy2306Utils {
    /**
     *
     *
     */
    public static void printPoem()
    //ctrl alt t
    {
        System.out.println("床前明月光");
        printDelimeter(10,"-");
        System.out.println("疑似地上霜");
        printDelimeter(10,"-");
        System.out.println("举头望明月");
        printDelimeter(10,"-");
        System.out.println("低头思故乡");
        printDelimeter(10,"-");
    }

    public static void printDelimeter(int num,String s){
        for (int i=0;i<num;i++)
        {
            System.out.print(s);
        }
        System.out.println();
    }

    public static void printTriangle(int lineNum,String s)
    {
        for (int i = 1; i <= lineNum; i++) {
            for (int j = lineNum; j > i; j--) {
                System.out.print(" ");
            }
            for (int j = 1; j <= 2 * i - 1; j++) {
                System.out.print("*");
            }
            System.out.println();
        }

    }


    //判断登陆
    public static boolean login(String username,String password)
    {
        if(username.equals("admin") && password.equals("123456"))
        {
            return true;
        }else {
            return false;
        }
    }
}


